package com.tjf.traffic.adapter;

import android.content.Context;

import com.tjf.traffic.R;
import com.tjf.traffic.baseadapter.BaseRecyclerAdapter;
import com.tjf.traffic.baseadapter.BaseRecyclerHolder;
import com.tjf.traffic.bean.TrafficDayInfo;

import java.util.List;

/**
 * @author: tjf
 * @date: 2022-12-09
 * @desc：
 */
public class TrafficDateAdapter extends BaseRecyclerAdapter<TrafficDayInfo> {
    public TrafficDateAdapter(Context context, List<TrafficDayInfo> list, int itemLayoutId) {
        super(context, list, itemLayoutId);
    }

    @Override
    public void convert(BaseRecyclerHolder holder, TrafficDayInfo item, int position, boolean isScrolling) {
        holder.setText(R.id.item_date_time_tv, item.getDateDayStr());
        holder.setText(R.id.item_all_traffic_tv, item.getTotalTraffic());
        holder.setText(R.id.item_up_traffic_tv, item.getTotalTxBytes());
        holder.setText(R.id.item_down_traffic_tv, item.getTotalRxBytes());
    }
}
